home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 521 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1017 b 

  1. Path: arlut.utexas.edu!usenet
  2. From: Lee Crites <crites>
  3. Newsgroups: comp.lang.c++
  4. Subject: overloading stream output (<<) with a template...
  5. Date: 4 Jan 1996 22:29:33 GMT
  6. Organization: Applied Research Laboratories - The University of Texas at Austin
  7. Message-ID: <4chkcd$n8q@ns1.arlut.utexas.edu>
  8. NNTP-Posting-Host: squid.arlut.utexas.edu
  9. Mime-Version: 1.0
  10. Content-Type: text/plain; charset=us-ascii
  11. Content-Transfer-Encoding: 7bit
  12. X-Mailer: Mozilla 1.1N (X11; I; HP-UX A.09.01 9000/730)
  13. X-URL: news:comp.lang.c++
  14.  
  15. I have a template that is defined like this:
  16.  
  17.     template <int theType, int theLength, class T> class Stuff
  18.  
  19. I would like to overload the << stream operator.  It works fine for the class
  20. before I made it into a template, but I just can't seem to get the right
  21. combination of things in the declarations of the ostream function.  Would some
  22. kind soul out there please show me the proper format for the friend declaration
  23. in the class and the actual ostream function declaration?
  24.  
  25. Thanks muchly...
  26.  
  27. Lee
  28.  
  29.